load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")

go_library(
    name = "isvalidator",
    srcs = ["validator.go"],
    importpath = "github.com/pingcap/tidb/pkg/infoschema/isvalidator",
    visibility = ["//visibility:public"],
    deps = [
        "//pkg/infoschema/validatorapi",
        "//pkg/metrics",
        "//pkg/sessionctx/vardef",
        "//pkg/util/intest",
        "//pkg/util/logutil",
        "@com_github_tikv_client_go_v2//oracle",
        "@com_github_tikv_client_go_v2//txnkv/transaction",
        "@org_uber_go_zap//:zap",
    ],
)

go_test(
    name = "isvalidator_test",
    timeout = "short",
    srcs = ["validator_test.go"],
    embed = [":isvalidator"],
    flaky = True,
    deps = [
        "//pkg/infoschema/validatorapi",
        "//pkg/sessionctx/vardef",
        "//pkg/util",
        "@com_github_stretchr_testify//require",
        "@com_github_tikv_client_go_v2//oracle",
        "@com_github_tikv_client_go_v2//txnkv/transaction",
    ],
)
